from homework.src.day10 import survivor
from homework.src.day10.survivor import Survivor


class Supervise:
    def __init__(self, name):
        self.name = name

    def beat(self, survivor: Survivor):
        print(f"{self.name}攻击{survivor.name}")

        if survivor.arrmor > 0:
            survivor.arrmor -= 0.5
            print(f"护盾抵挡攻击,剩余血量{survivor.hp}")


        else:
            survivor.hp -= 0.5
            if survivor.hp == 0 or survivor.hp < 0:

                print(f"{survivor.name}倒地了")

    def skill(self, survivor: Survivor):
        pass


class HongDie(Supervise):

    def skill(self, survivor: Survivor):
        super().skill()
        print(f"{self.name}释放技能蝴蝶攻击{survivor.name}")


class Jack(Supervise):

    def skill(self, survivor: Survivor):
        print(f"{self.name}使用技能小丑攻击{survivor.name}")
        survivor.hp -= 0.5
        if survivor.hp == 0 or survivor.hp < 0:
            print(f"{survivor.name}倒地了")


class ChangZhang(Supervise):

    def skill(self):
        print(f"{self.name}释放技能发狂")
